package com.zhang.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品评价表
 * </p>
 *
 * @author 创世神
 * @since 2024-04-20
 */
@Getter
@Setter
@TableName("goods_appraise")
public class GoodsAppraise implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("order_id")
    private Long orderId;

    @TableField("sku_id")
    private Long skuId;

    /**
     * 文字评价
     */
    @TableField("comment")
    private String comment;

    /**
     * 评分（1,2,3,4,5)星级
     */
    @TableField("rating")
    private Integer rating;

    /**
     * 评论人的id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * sku默认的图片
     */
    @TableField("sku_img")
    private Long skuImg;

    /**
     * 用户昵称
     */
    @TableField("user_name")
    private String userName;

    /**
     * sku的规格信息(以逗号隔开）
     */
    @TableField("sku_specs")
    private String skuSpecs;

    /**
     * 所属订单项
     */
    @TableField("order_item_id")
    private Long orderItemId;

    /**
     *用户头像
     */
    @TableField("user_avatar")
    private Long userAvatar;
    /**
     *点赞数量
     */
    @TableField("like_count")
    private Long likeCount;

    @TableField(exist = false)
    private List<AppraiseFile> appraiseFiles;
}
